#include <iostream>
using namespace std;

class fbyvector{
public:
    fbyvector(double xlim = 0, double ylim = 0): m_xlim(xlim), m_ylim(ylim){ };
public:
    friend fbyvector operator+(const fbyvector & A, const fbyvector & B);
    friend istream & operator>>(istream & in, fbyvector & A);
    friend ostream & operator<<(ostream & out, fbyvector & A);
private:
    double m_xlim;              //x
    double m_ylim;              //y
};

//重载加法运算符
fbyvector operator+(const fbyvector & A, const fbyvector &B){
    fbyvector C;
    C.m_xlim = A.m_xlim + B.m_xlim;
    C.m_ylim = A.m_ylim + B.m_ylim;
    return C;
}
//重载输入运算符
istream & operator>>(istream & in, fbyvector & A){
    in >> A.m_xlim >> A.m_ylim;
    return in;
}
//重载输出运算符
ostream & operator<<(ostream & out, fbyvector & A){
    out << A.m_xlim <<" + "<< A.m_ylim <<" i ";;
    return out;
}

int main(){
    fbyvector v1, v2, v3;
    cin>>v1>>v2;

    v3 = v1 + v2;
    cout<<"v1 + v2 = "<<v3<<endl;

    return 0;
}